package Lesson4;

import java.util.Scanner;

public class Task1 {

	public static void main(String[] args) {

		Scanner sc = new Scanner (System.in);
		
		System.out.println("Enter the length of the array: ");
		int length = sc.nextInt();
		
		int [] arr = new int [length];
		
		int number;
		
		System.out.println("Enter the number in the elements of the array");
		
		for (int i = 0; i < arr.length; i++)
		{
			System.out.print((i+1)+". ");
			number = sc.nextInt();
			
			arr[i] = number;
		}
		
			System.out.print("The positive numbers in the array are: ");
		for (int i = 0; i < arr.length; i++)
		{
			if (arr[i] > 0)
			{
				System.out.print(arr[i] + " ");
				
			}
			
		
		}
		
		
		
		
		
	}

}
